package elements;

import java.awt.Graphics;

import scaler.Scaler;

import mover.GameMover;

public class GameCircle extends GameElement {
	private int diameter;

	public GameCircle(GameMover mover, Scaler scaler, int diameter) {
		super(mover, scaler);
		this.diameter = diameter;
	}

	@Override
	public void paint(Graphics g) {
		if(trans == NOT_VISIBLE) return;
		
		g.setColor(transparentColor());
		g.fillOval(super.getMovedX(), super.getMovedY(), this.scaler.calcX(diameter), this.scaler.calcY(diameter));
	}
	
	public void setDiameter(int diameter) { this.diameter = diameter; }
	public int getDiameter() { return diameter; }

	@Override
	public int getWidth() {
		return diameter;
	}

	@Override
	public int getHeight() {
		return diameter;
	}

	@Override
	public GameCircle clone() throws CloneNotSupportedException {
		GameCircle clone = new GameCircle(this.mover.clone(), this.scaler, this.diameter);
		this.clone_help(clone);
		
		return clone;
	}
}